-- GENERATED SPELL FOR [Captured Mercenary Soldier] --


function spell0_32885(pUnit, Event) --@Barbed Shot,n/a--
pUnit:FullCastSpellOnTarget(62318,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32885', 12000, 1)
end

function spell1_32885(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32885', 593, 1)
end

function spell2_32885(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(40652,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32885', 10257, 1)
end

function Sorts_32885(pUnit, Event)
local choix_sorts_32885 = math.random(0, 2)
if choix_sorts_32885 == 0 then
pUnit:RegisterEvent('spell0_32885', 1, 1)
end
if choix_sorts_32885 == 1 then
pUnit:RegisterEvent('spell1_32885', 1, 1)
end
if choix_sorts_32885 == 2 then
pUnit:RegisterEvent('spell2_32885', 1, 1)
end
end

function mob32885_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32885', math.random(1500, 3000), 1)
end

function mob32885_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32885_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32885_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32885, 1, 'mob32885_Action')
RegisterUnitEvent(32885, 2, 'mob32885_Leave')
RegisterUnitEvent(32885, 3, 'mob32885_Kill')
RegisterUnitEvent(32885, 4, 'mob32885_Die')
